home *** CD-ROM | disk | FTP | other *** search
/ Chip: 2001 Haziran / CHIP Haziran2001.iso / prog / haziran / 20 / setup.exe / {app} / plugins / XQ MSI Options 3.xpl < prev    next >
Encoding:
XSetup plugin  |  2001-03-28  |  2.3 KB  |  65 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 5.0"
  2. "TYPE"="6"
  3. "COUNT"="4"
  4. "UIPATH"="System\Software Installation\Windows Installer"
  5. "NAME"="Logging Options"
  6. "VERSION"="1.00"
  7. "LANGUAGE"="VBScript"
  8. "TEXT 1"="Log all errors"
  9. "TEXT 2"="Log out-of-memory errors"
  10. "TEXT 3"="Log all warnings (not fatal)"
  11. "TEXT 4"="Log user requests"
  12. "TEXT 5"="Log when starting commands"
  13. "DESCRIPTION 1"="By default, the setup process for an application determines whether the process maintains a log for itself.  This option allows you to enable the logging for the setup of an applications, regardless of this default."
  14. "DESCRIPTION 2"="If at least one option is turned on, a logfile for every installation will be created in your TEMP directory in the form "MSI*.LOG" where "*" is a randomly generated name."
  15. "DESCRIPTION 3"="To disable logging for all applications again, clear all fields."
  16. "AUTHOR"="Xteq Systems"
  17. "CONTACTURL"="http://www.xteq.com"
  18. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  19. "COMMENT 1"=" "
  20. "COMMENT 2"="By default, every application sets itself if the setup should be logged or not. By setting an option here, you can enable the logging for all setups regardless if it's activated by the application or not."
  21. "COMMENT 3"="Thanks to Umesh Reghuram for his suggestions!"
  22.  
  23.  
  24. sPathSys="HKLM\Software\Policies\Microsoft\Windows\Installer\"
  25. sPathUsr="HKCU\Software\Policies\Microsoft\Windows\Installer\"
  26.  
  27. sV1="Logging" 'STR - sys
  28. Sub Plugin_Initialize 
  29.  s=RegReadValue(sPathSys & sV1)
  30.  
  31.  if InStr(1,s,"e")>0 then setuielement 1,true
  32.  if InStr(1,s,"m")>0 then setuielement 2,true
  33.  if InStr(1,s,"w")>0 then setuielement 3,true
  34.  if InStr(1,s,"u")>0 then setuielement 4,true
  35.  if InStr(1,s,"a")>0 then setuielement 5,true
  36. End Sub
  37.  
  38. Sub Plugin_CheckData(ElementIndex)
  39. End Sub
  40.  
  41. Sub Plugin_Apply(ElementIndex,ElementSubIndex)
  42.  s=""
  43.  
  44.  if GetUIElement(1)=true then s=s & "e"
  45.  if GetUIElement(2)=true then s=s & "m"
  46.  if GetUIElement(3)=true then s=s & "w"
  47.  if GetUIElement(4)=true then s=s & "u"
  48.  if GetUIElement(5)=true then s=s & "a"
  49.  
  50.  if len(s)>0 then
  51.     'Enable logging
  52.     Call RegWriteValue(sPathSys & sV1,s,1)
  53.  else
  54.     'Disable logging
  55.     s=RegReadValue(sPathSys & sV1)
  56.     if IsEmpty(s)=false then
  57.        Call RegDeleteValue(sPathSys & sV1)
  58.     end if
  59.  end if
  60.  
  61. End Sub
  62.  
  63. Sub Plugin_Terminate 
  64. End Sub
  65.